package com.example.widgethost;

import android.os.Bundle;
import android.widget.Button;
import android.widget.LinearLayout;

import androidx.fragment.app.FragmentActivity;

public class MainActivity extends FragmentActivity {
    private static final String TAG = "MainActivity";
    private Button button;
    private HostConstructor hostConstructor;
    private LinearLayout widgetsHostLayout;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initViews();
        intiComponent();
    }


    private void initViews() {
        button = findViewById(R.id.select_widget);
        widgetsHostLayout = findViewById(R.id.widget_container);
    }

    private void intiComponent() {
        hostConstructor = new HostConstructor(this, widgetsHostLayout);
        hostConstructor.addDefaultWidgetsToHost();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }
}